<script type="text/javascript">
    $(document).ready(function() {
        // date picker
        $(".tanggal").datepicker({
            yearRange: '-1:+1',
            target: 'tanggal',
            changeMonth: true,
            changeYear: true,
            showOn: 'both',
            buttonImage: '{$BASEURL}/resource/doc/images/icon/calendar.gif',
            buttonImageOnly: true,
            dateFormat: 'yy-mm-dd'
        });
    });
</script>
<div class="breadcrum">
    <p>
        <a href="#">Inventarisasi</a>
        <span></span><a href="{$config->site_url('inventarisasi/pengadaan')}">Pengadaan</a>
        <span></span><small>Hapus<small>
    </p>
    <div class="clear"></div>
</div>  
<div class="sub-content">  
    <div class="navigation">  
        <div class="navigation-button">
            <ul>
                <li><a href="{$config->site_url('inventarisasi/pengadaan/add')}"><img alt="" src="{$BASEURL}/resource/doc/images/icon/add-icon.png">Tambah Data</a></li>
                <li><a href="{$config->site_url('inventarisasi/pengadaan')}"><img alt="" src="{$BASEURL}/resource/doc/images/icon/icon.notes.blue.png">Daftar Data</a></li> 
            </ul>
            <div class="clear"></div>
        </div>
    </div> 
    <!-- notification template -->
    {include file="base/templates/notification.html"}
    <!-- end of notification template--> 
    <form action="{$config->site_url('inventarisasi/pengadaan/delete_process')}" method="post" enctype="multipart/form-data">
        <input type="hidden" name="pengadaan_id" value="{$result_info.pengadaan_id|default:''}">
        <table width="100%" class="table-input">
            <tbody>
                <tr class="headrow">
                    <th colspan="4">Hapus Pengadaan</th>
                </tr>
                <tr>
                    <td width="15%">Nomor Pengadaan</td>
                    <td width="85%">{$result_info.pengadaan_nomor|default:''}</td>  
                </tr>
                <tr>
                    <td>Tanggal </td>
                    <td>{$dtm->get_full_date($result_info.pengadaan_date|default:'')}</td>
                </tr>
                <tr>
                    <td>Bagian</td>
                    <td>{$result_info.bagian_name|default:''}</td>     
                </tr>   
                 <tr>
                    <td>Total</td>
                    <td id="total" style="color: red;"><b>Rp. {$total|number_format:0:",":"."}</b></td>   
                </tr>   
                <tr>
                    <td>Invoice</td>
                    <td>                     
                        {if {$result_info.pengadaan_att_surat|default:''} neq ''}  
                            <a href="{$filepath}{$result_info.pengadaan_att_surat}" data-lightbox="image-1" title="Pengadaan Nomor Surat : {$result.pengadaan_nomor|default:''}">
                                <img width="100px" height="100px" src="{$filepath}{$result_info.pengadaan_att_surat}" />
                            </a>
                        {/if}
                    </td>  

                </tr> 
                <tr>
                    <td>Keterangan</td>
                    <td>{$result_info.pengadaan_keterangan|default:''}</td>  
                </tr> 
                <tr class="submit-box">
                    <td colspan="4">
                        <input type="submit" class="edit-button" value="Hapus" name="save[insert]">                        
                    </td>
                </tr>
            </tbody>
        </table>
    </form> 
    
    <table width="100%" class="table-view">
            <tbody>
                <tr>
                    <th width="3%">No</th>
                    <th width="35%">Nama</th> 
                    <th width="5%">Qty</th> 
                    <th width="10%">Perkiraan<br />Harga Satuan<br />(Rp)</th>
                    <th width="15%">Jumlah(Rp)</th> 
                    <th width="20%">Keterangan</th>
                    <th width="10%">Lokasi</th>   
                </tr>  
                {assign var=numb value=1} 
                {foreach from=$rs_id key=no item=result}
                <tr {if ($no % 2) <> 0}class="blink-row"{/if}>
                    <td align="center">{$numb++}</td>
                    <td>{$result.pengajuanbarang_nama}</td>
                    <td align="center">{$result.pengajuanbarang_qty}</td>
                    <td align="right">{$result.pengajuanbarang_hargasatuan}</td>
                    <td align="right">{$result.pengajuanbarang_hargasatuan * $result.pengajuanbarang_qty}</td>
                    <td>{$result.pengajuanbarang_keterangan}</td>
                    <td>{$result.lokasi_name}</td> 
                    
                </tr>
                {foreachelse}
                <tr>
                    <td colspan="7">Data masih kosong</td>
                </tr>
                {/foreach}

            </tbody>
        </table> 
    
</div>